import React from "react";
import "./index.less";

const Button = props => {
    const { className, onClick, children, size, type, style } = props;
    return (
        <div
            style={style}
            className={`custom-button ${size} ${className} ${type}`}
            onClick={onClick}
        >
        {Array.isArray(children) ? children.map(item => item) :children}
        </div>
    );
};
Button.defaultProps = {
 className: "",
 size: "middle",
 onClick: () => {},
 type: "",
 style: {}
};

export default Button;